package falcon.script;

import java.util.HashMap;

public final class FalconLangGlobal {

	public FalconLangGlobal() {
		m_map = new HashMap<String, String>();
		m_compiler = new FalconLangCompiler();
		m_processor = new FalconLangProcessor(this);
		m_loader = new FalconLangLoader(this);
		m_debuger = new FalconLangDebuger(this);
	}
	
	public void bindFunc(String name, String path) {
		m_map.put(String.format("FUNC.%s", name), path);
	}
	
	public void bindFlow(String name, String path) {
		m_map.put(String.format("FLOW.%s", name), path);
	}
	
	public String getFunc(String name) {
		return m_map.get(String.format("FUNC.%s", name));
	}
	
	public String getFlow(String name) {
		return m_map.get(String.format("FLOW.%s", name));
	}
	
	public FalconLangCompiler getCompiler() {
		return m_compiler;
	}
	
	public FalconLangProcessor getProcessor() {
		return m_processor;
	}
	
	public FalconLangLoader getLoader() {
		return m_loader;
	}
	
	public FalconLangDebuger getDebuger() {
		return m_debuger;
	}

	private HashMap<String, String> m_map;
	private FalconLangCompiler m_compiler;
	private FalconLangProcessor m_processor;
	private FalconLangLoader m_loader;
	private FalconLangDebuger m_debuger;
}
